<schema
  targetNamespace="http://kis.x-road.eu/"
             xmlns:doc="http://kis.x-road.eu/"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns="http://www.w3.org/2001/XMLSchema"
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
             xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<!--   <import  namespace="http://x-tee.riik.ee/xsd/xtee.xsd" schemaLocation="file:///C:/arendus/XteeSolution/Src/Xtee.CodeDom.Test/bin/Debug/xsds/xtee.xsd" />
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"
            schemaLocation="file:///C:/arendus/XteeSolution/Src/Xtee.CodeDom.Test/bin/Debug/xsds/soapenc.xsd" /> -->

    <element name="sizes" type="doc:SizeTypeAnonymouse"/>

    <complexType name="SizesType">
      <choice maxOccurs="unbounded">
        <element name="dressSize" type="doc:DressSizeType"/>
        <element name="mediumDressSize" type="doc:MediumDressSizeType"/>
        <element name="smallDressSize" type="doc:SmallDressSizeType"/>
        <element name="smlxSize" type="doc:SMLXSizeType"/>
        <element name="xsmlxSize" type="doc:XSMLXSizeType"/>
      </choice>
    </complexType>

    <simpleType name="DressSizeType">
      <restriction base="integer">
        <minInclusive value="2"/>
        <maxInclusive value="18"/>
        <pattern value="\d{1,2}"/>
        <enumeration value="5"></enumeration>
      </restriction>
      
    </simpleType>

    <simpleType name="MediumDressSizeType">
      <restriction base="doc:DressSizeType">
        <minInclusive value="8"/>
        <maxInclusive value="12"/>
      </restriction>
    </simpleType>

    <simpleType name="SmallDressSizeType">
      <restriction base="doc:DressSizeType">
        <minInclusive value="2"/>
        <maxInclusive value="6"/>
        <pattern value="\d{1}"/>
      </restriction>
    </simpleType>

  
  <simpleType name="SMLXSizeType">
      <restriction base="token">
        <pattern value="(1|2|3)"></pattern>
        <minLength value="5"></minLength>
        <enumeration value="small">
          <annotation>
            <appinfo>
              Väike
            </appinfo>
          </annotation>
        </enumeration>
        <enumeration value="medium">
          <annotation>
            <appinfo>
              <![CDATA[
              Keskmine
              ]]>
            </appinfo>
          </annotation>
        </enumeration>
        <enumeration value="large">
          <annotation>
             
            
            <documentation>
                <![CDATA[
              Väga suur
              ]]>
            </documentation>

          </annotation>
        </enumeration>
        <enumeration value="extra large"/>
      </restriction>
    </simpleType>

    <simpleType id ="asdf"  name="XSMLXSizeType">
 
      <union memberTypes="doc:SMLXSizeType doc:DressSizeType">
       
        <simpleType>
          <restriction base="token">
            <minLength value="4"></minLength>
            <enumeration value="extra small"/>
          </restriction>
        </simpleType>
        <simpleType id="markus">
          <restriction base="token">
            <minLength value="6"></minLength>
            <enumeration value="extra extra small"/>
           
          </restriction>
        </simpleType>
       
      </union>
    </simpleType>

  <simpleType name="SizeTypeAnonymouse">
    <union memberTypes="doc:DressSizeType">
      <simpleType>
        <union>
          <simpleType>
            <restriction base="token">

              <enumeration value="small"/>
              <enumeration value="medium"/>
              <enumeration value="large"/>
            </restriction>
          </simpleType>
        </union>
        
      </simpleType>
    </union>
  </simpleType>
  <simpleType name="ApplicableSizesType">
    <restriction>
      <simpleType>
        <list itemType="doc:SizeTypeAnonymouse"/>
      </simpleType>
     
      <enumeration value="small medium large"/>
      <enumeration value="small medium"/>
    </restriction>
  </simpleType>
  <simpleType name="NonApplicableSizesType">
    <list itemType="doc:SizeTypeAnonymouse"  >
      
    </list>
   
  </simpleType>

</schema>
 